/*
 * Copyright (C) 2011 Urals State University,
 * Department of Mathematics and Mechanics
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ru.edu.usu.cs.bubbles.engine;

import java.util.List;

import ru.edu.usu.cs.bubbles.utils.Point;

public abstract class GameWorld {
	public abstract List<GameEntity> getEntities();

	public abstract void step(float time);

	public abstract Bubble createBubble(float xPosition, float yPosition,
			float radius);

	public Bubble createBubble(Point Position, float radius) {
		return createBubble(Position.x, Position.y, radius);
	}

	public abstract Fan createFan(float xPosition, float yPosition,
			float power, float angle);

	public Fan createFan(Point Position, float power, float angle) {
		return createFan(Position.x, Position.y, power, angle);
	}

	public abstract Fish createFish(float xPosition, float yPosition,
			float angle);

	public Fish createFish(Point Position, float angle) {
		return createFish(Position.x, Position.y, angle);
	}

	public abstract Spike createSpike(float xPosition, float yPosition,
			float angle);

	public Spike createSpike(Point Position, float angle) {
		return createSpike(Position.x, Position.y, angle);
	}

	public abstract Wall createWall(float length, float width, Point center,
			float angle);

	/*
	 * public Wall createWall(float minX, float minY, float maxX, float maxY,
	 * float angle) { float length = maxX - minX; float height = maxY - minY;
	 * return createWall(width, height, new Vector(maxX - width, maxY - height),
	 * angle); }
	 */

	public abstract Whirlpool createWhirlpool(float xPosition, float yPosition,
			float radius, float power);

	public Whirlpool createWhirlpool(Point Position, float radius, float power) {
		return createWhirlpool(Position.x, Position.y, radius, power);
	}

	public abstract void destroyEntity(GameEntity entity);

	public abstract Wall createIceWall(float length, float width, Point center,
			float angle);

	/**
	 * используется пара методов - пометить к удалению (markDestroy) и удалить
	 * все помеченные (DestroyAllMarked)
	 *<BR> 
	 * Только помечает, больше ничего
	 * 
	 * @param entity
	 */
	public abstract void markDestroy(GameEntity entity);

	/**
	 * используется пара методов - пометить к удалению (markDestroy) и удалить
	 * все помеченные (DestroyAllMarked)
	 *<BR>
	 * Удаляет только те, что были помечены 
	 */
	public abstract void destoyAllMarked();
}
